﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Text;

namespace CoreSystem.Renderer
{
    public class UseAntiAlias : IDisposable
    {
        // Fields
        private Graphics _g;
        private SmoothingMode _old;

        // Methods
        public UseAntiAlias(Graphics g)
        {
            this._g = g;
            this._old = this._g.SmoothingMode;
            this._g.SmoothingMode = SmoothingMode.AntiAlias;
        }

        public void Dispose()
        {
            this._g.SmoothingMode = this._old;
        }
    }
}
